package com.tencent.wxcloudrun.vo.response.acti;

import com.tencent.wxcloudrun.domain.TActi;
import com.tencent.wxcloudrun.dto.ActiListResDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author ZhaoZiYin
 * @Date 2025/4/22
 * @Description 查询活动列表请求出参
 */
@Data
@ApiModel(value = "ActiListResVo", description = "查询活动列表请求出参")
public class ActiListResVo {

    @ApiModelProperty("活动列表")
    private List<ActiListResDTO> actiList;

    public void build(List<TActi> dbList) {
        List<ActiListResDTO> actiDTOList = new ArrayList<>(dbList.size());
        for (TActi acti : dbList) {
            ActiListResDTO resDTO = new ActiListResDTO();
            resDTO.build(acti);
            actiDTOList.add(resDTO);
        }
        this.setActiList(actiDTOList);
    }

}
